package com.zrrd.mybatisplus_test.controller;


import com.zrrd.mybatisplus_test.entity.Tea;
import com.zrrd.mybatisplus_test.service.TeaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wanjl
 * @since 2024-04-22
 */
@RestController
@RequestMapping("/teas")
public class TeaController {

    @Resource
    private TeaService teaService;

    @GetMapping
    @ResponseBody
    public List<Tea> teas() {
        return teaService.list();
    }
}

